<%-- 
    Document   : login
    Created on : 22-mar-2012, 11.17.53
    Author     : Lella
--%>

<form id="login" method="post" action="Controller">
    <fieldset id="sign">
        <%if(request.getSession().getAttribute("username") == null){%>
            <legend>Login</legend>
            <label for="inputtext1">Username:</label>
            <input id="inputtext1" type="text" name="usr" value="" />
            <label for="inputtext2">Password:</label>
            <input id="inputtext2" type="password" name="pwd" value="" />
            <input id="inputsubmit1" type="submit" name="inputlogin" value="Sign In" />
            <p><a href="#">Password dimenticata?</a></p>
            <a href="RegistrazioneUtente.jsp">Registrati!</a>
            <div id="fb-root"></div>
            <div class="fb-login-button" autologoutlink="true" width="200"></div>
        <%}else{%>
            <div>Benvenuto <%=session.getAttribute("username")%></div>
            <input type="submit" name="inputlogin" value="logout"/>
            <jsp:include page="NumeroElementiCarrello"></jsp:include>
        <%}%>
        <input type="hidden" name="page" value=<%= request.getServletPath()%>>
        <%if(request.getParameter("valore")!=null) {%>
        <input type="hidden" name="id_prodotto" value=<%= request.getParameter("valore")%>>
        <%}%>
            
    </fieldset>
</form>